<template>
	<view class="wrap">
		<view class="care-all">
			<view class="cate-section">
				<view class="cate-item" v-for="item in pageList" @tap="goPages(item)" :key='item.pageid'>
					<image v-if="project>=item.pageid" :src="item.urlOne"></image>
					<image v-else :src="item.urlTwo"></image>
					<text>{{item.title}}</text>
				</view>
			</view>
		</view>	
		<view class="tabbar-box" v-if="showTabbar">
			<tab-bar :navs="navs" :counts="navCounts" :current="navCurrent" @onChange="onNavBarChange"></tab-bar>
		</view>
		<view class="page-box" v-if="showPage.show1">
			<tab-page-one v-show="navCurrent===0" :pageData='pageData' ></tab-page-one>
			<tab-page-two v-show="navCurrent===1" :pageData='pageData' ></tab-page-two>
			<tab-page-the v-show="navCurrent===2" :pageData='pageData'></tab-page-the>
		</view>
		<view class="page-box" v-else-if="showPage.show2">
			<tab-page-four v-show="navCurrent===0" :pageData='pageData'></tab-page-four>
			<tab-page-five v-show="navCurrent===1" :pageData='pageData'></tab-page-five>
			<tab-page-six  v-show="navCurrent===2" :pageData='pageData'></tab-page-six>
		</view>
		<view class="page-box" v-else-if="showPage.show3">
			<tab-page-seve  v-show="showPage.show3" :pageData='pageData'></tab-page-seve>
		</view>
		<view class="page-box" v-else-if="showPage.show4">
			<tab-page-eight v-show="showPage.show4" :pageData='pageData'></tab-page-eight>
		</view>
		<view class="page-box" v-else-if="showPage.show5">
			<tab-page-nine v-show="showPage.show5" :pageData='pageData'></tab-page-nine>
		</view>
		<view class="page-box" v-else-if="showPage.show6">
			<tab-page-ten v-show="navCurrent===0" :pageData='pageData'></tab-page-ten>
			<tab-page-eleven  v-show="navCurrent===1" :pageData='pageData'></tab-page-eleven>
		</view>
		<view class="page-box" v-else-if="showPage.show7">
			<tab-page-twelve v-show="showPage.show7" :pageData='pageData'></tab-page-twelve>
		</view>
		<view class="page-box" v-else-if="showPage.show8">
			<tab-page-thirteen v-show="showPage.show8" :pageData='pageData'></tab-page-thirteen>
		</view>
		<view class="page-box" v-else-if="showPage.show9">
			<tab-page-fourteen v-show="showPage.show9" :pageData='pageData'></tab-page-fourteen>
		</view>
		<view class="page-box" v-else-if="showPage.show10">
			<tab-page-fifteen v-show="navCurrent===0" :pageData='pageData'></tab-page-fifteen>
			<tab-page-sixteen v-show="navCurrent===1" :pageData='pageData'></tab-page-sixteen>
			<tab-page-seventeen v-show="navCurrent===2" :pageData='pageData'></tab-page-seventeen>
		</view>
		<view class="fixed-action-bar" v-if="showFoot==1">
			<view class="item" @click="handleEdit">
				<view class="btn-box">
					<image src="../../../static/images/icon_edit.png" mode="widthFix" class="icon"></image>
					<text class="text-edit">编辑</text>
				</view>
			</view>
			<view class="item" @click="handleDelete">
				<view class="btn-box">
					<image src="../../../static/images/icon_del.png" mode="widthFix" class="icon"></image>
					<text class="text-delete">删除</text>
				</view>
			
			</view>
		</view>
	</view>
</template>

<script>
	import tabBar from '../components/tab-bar.vue';
	import tabPageOne from './components/tab-page-one.vue'
	import tabPageTwo from './components/tab-page-two.vue'
	import tabPageThe from './components/tab-page-the.vue'
	import tabPageFour from './components/tab-page-four.vue'
	import tabPageFive from './components/tab-page-five.vue'
	import tabPageSix from './components/tab-page-six.vue'
	import tabPageSeve from './components/tab-page-seve.vue';
	import tabPageEight from './components/tab-page-eight.vue';
	import tabPageNine from './components/tab-page-nine.vue';
	import tabPageTen from './components/tab-page-ten.vue';
	import tabPageEleven from './components/tab-page-eleven.vue';
	import tabPageTwelve from './components/tab-page-twelve.vue';
	import tabPageThirteen from './components/tab-page-thirteen.vue';
	import tabPageFourteen from './components/tab-page-fourteen.vue';
	import tabPageFifteen from './components/tab-page-fifteen.vue';
	import tabPageSixteen from './components/tab-page-sixteen.vue';
	import tabPageSeventeen from './components/tab-page-seventeen.vue';
	export default {
		components:{
			tabBar,
			tabPageOne,
			tabPageTwo,
			tabPageThe,
			tabPageFour,
			tabPageFive,
			tabPageSix,
			tabPageSeve,
			tabPageEight,
			tabPageNine,
			tabPageTen,
			tabPageEleven,
			tabPageTwelve,
			tabPageThirteen,
			tabPageFourteen,
			tabPageFifteen,
			tabPageSixteen,
			tabPageSeventeen
		},
		data() {
			return {
				pageList:[
					{pageid:1 ,title:"项目入库",urlOne:'/static/images/project_nav_001.png',urlTwo:'/static/images/project_nav_101.png'},
					{pageid:2 ,title:"项目评估",urlOne:'/static/images/project_nav_002.png',urlTwo:'/static/images/project_nav_102.png'},
					{pageid:3 ,title:"项目核查",urlOne:'/static/images/project_nav_003.png',urlTwo:'/static/images/project_nav_103.png'},
					{pageid:4 ,title:"项目再评估",urlOne:'/static/images/project_nav_004.png',urlTwo:'/static/images/project_nav_104.png'},
					{pageid:5 ,title:"商务谈判",urlOne:'/static/images/project_nav_005.png',urlTwo:'/static/images/project_nav_105.png'},
					{pageid:6 ,title:"合同签署",urlOne:'/static/images/project_nav_006.png',urlTwo:'/static/images/project_nav_106.png'},
					{pageid:7 ,title:"公司登记",urlOne:'/static/images/project_nav_007.png',urlTwo:'/static/images/project_nav_107.png'},
					{pageid:8 ,title:"项目供地",urlOne:'/static/images/project_nav_008.png',urlTwo:'/static/images/project_nav_108.png'},
					{pageid:9 ,title:"项目建设",urlOne:'/static/images/project_nav_009.png',urlTwo:'/static/images/project_nav_109.png'},
					{pageid:10 ,title:"投后服务",urlOne:'/static/images/project_nav_010.png',urlTwo:'/static/images/project_nav_110.png'}
				],
				showPage:{show1:false,show2:false,show3:false,show4:false,show5:false,show6:false,show7:false,show8:false,show9:false,show10:false},
				showTabbar:false,
				navCounts: [], //订单数量
				navs: [
					{name: '本周报送'},
					{name: '本季跟进'},
					{name: '本季跟进'},
				],
				navCurrent: 0, //当前tab
				upOption:{
					page: {
					 	num: 0, // 当前页码,默认0,回调之前会加1,即callback(page)会从1开始
					 	size: 10 // 每页数据的数量
					},
					noMoreSize: 3, //如果列表已无数据,可设置列表的总数量要大于半页才显示无更多数据;避免列表数据过少(比如只有一条数据),显示无更多数据会不好看; 默认5
				},
				
				code:'code',//项目主键
				project:null,//项目阶段
				pageData:{},//详情数据
				dicData:{},
				renmingData:[],//跟进负责人
				zhutiData:[],//主体名称
				zhongjieData:[],//中介机构名称
				dataKey:'',
				showFoot:0,
				changeListData:[],
				prostage:0,//当前阶段
				personData:[],//人名参数
				
			}
		},
		methods: {
			handleEdit(){
				const path = `/pages/projectManerge/edit/edit?code=${this.code}&project=${this.project}&prostage=${this.prostage}`
				uni.navigateTo({
					url:path
				})
				
			},
			async deletetpro(){
				uni.showLoading()
				const res = await this.$req({
					url: 'bus/proj/remove.do',
					data: {
						selectedIds: this.code
					}
				})
				uni.hideLoading()
				if (res.data.success) {
					uni.showToast({
						title: '操作成功'
					})
					setTimeout(()=>{
						uni.navigateBack()
					},800)
				} else {
					uni.showToast({
						title: '删除失败',
						icon: 'none'
					})
				}
			},
			handleDelete() {
				let vm=this
				uni.showModal({
					title: '提示',
					content: '确定要删除此项目吗？',
					success: (res) => {
						if(res.confirm) {  
							vm.deletetpro()
						} else {  
							console.log('else', res)
						}  
					} 
				})
			},
			initShow(){
				this.showTabbar=false
				this.navCurrent=0
				this.showPage={show1:false,show2:false,show3:false,show4:false,show5:false,show6:false,show7:false,show8:false,show9:false,show10:false}
			},
			//tab切换
			onNavBarChange(current){
				// console.log(current)
				if(this.navCurrent === current){
					return;
				}
				this.navCurrent = current;
				this.refreshList();
			},
			//进行其他项目步骤
			goPages(item){
				let goPageUrl=''
				this.prostage=item.pageid
				if(item.pageid>this.project){
					return uni.showToast({
						title:'项目还未进行到该阶段',
						icon:'none'
					})
				}
				this.initShow()
				uni.setNavigationBarTitle({
					title: item.title
				})
				if(item.pageid===1){
					this.showPage.show1=true
					this.showTabbar=true
					goPageUrl='bus/proj/view.do'
					this.navs=[
						{name: '项目信息'},
						{name: '主体信息'},
						{name: '跟进团队'}
					]
					this.toDetailData(goPageUrl,item.pageid)
				}else if(item.pageid===2){
					this.showPage.show2=true
					this.showTabbar=true
					goPageUrl='bus/proj/discuss/view.do'
					this.navs=[
						{name: '评估材料'},
						{name: '洽谈信息'},
						{name: '用地信息'},
					]
					this.toDetailData(goPageUrl,item.pageid)
				}else if(item.pageid===3){
					this.showPage.show3=true
					goPageUrl='bus/proj/check/view.do'
					this.navs=[
						{name: '项目核查'}
					]
					this.toDetailData(goPageUrl,item.pageid)
				}else if(item.pageid===4){
					//notab
					this.showPage.show4=true
					goPageUrl='bus/proj/eval/view.do'
					this.navs=[
						{name: '项目再评估'}
					]
					this.toDetailData(goPageUrl,item.pageid)
				}else if(item.pageid===5){
					//notab
					this.showPage.show5=true
					goPageUrl='bus/proj/negotiate/view.do'
					this.navs=[
						{name: '商务谈判'}
					]
					this.toDetailData(goPageUrl,item.pageid)
				}else if(item.pageid===6){
					this.showPage.show6=true
					this.showTabbar=true
					goPageUrl='bus/proj/contract/getDataKey.do'
					this.navs=[
						{name: '项目合同'},
						{name: '中介机构合同'}
					]
					this.getProData(goPageUrl,item.pageid)
				}else if(item.pageid===7){
					//notab
					this.showPage.show7=true
					goPageUrl='bus/proj/company/getDataKey.do'
					this.navs=[
						{name: '公司登记'}
					]
					this.getProData(goPageUrl,item.pageid)
				}else if(item.pageid===8){
					//notab
					this.showPage.show8=true
					goPageUrl='bus/proj/supply/getDataKey.do'
					this.navs=[
						{name: '项目供地'}
					]
					this.getProData(goPageUrl,item.pageid)
				}else if(item.pageid===9){
					this.showPage.show9=true
					goPageUrl='bus/proj/build/getDataKey.do'
					this.navs=[
						{name: '项目建设'}
					]
					this.getProData(goPageUrl,item.pageid)
				}else if(item.pageid===10){
					this.showPage.show10=true
					this.showTabbar=true
					goPageUrl='bus/proj/track/view.do'
					this.navs=[
						{name: '项目信息'},
						{name: '列表信息'},
						{name: '收入统计'}
					]
					this.toDetailData(goPageUrl,item.pageid)
				}else{
					uni.showToast({
						title:'项目还未进行到该阶段',
						icon:'none'
					})
				}
			},
			refreshList(){
			},
			async toDetailData(url,itId){
				uni.showLoading()
				const res = await this.$req({
					url:url,
					method:'GET',
					data:{
						dataKey:this.code	
					}
				})
				uni.hideLoading()
				if(res.data.success){
					this.pageData=res.data.attributes
					//跟进负责人
					if(res.data.attributes.zdyDataSource.personDataSourceManage){
						this.renmingData = res.data.attributes.zdyDataSource.personDataSourceManage
						this.renmingData.map(item=>{
							if(item.CODE===this.pageData.model.MANAGER){
								this.pageData.genjinren=item.CODE_NAME
							}
						})
					}
					if(this.pageData.model.CREATEWORKGROUP&&this.pageData.model.CREATEWORKGROUP==1){
						this.pageData.model.CREATEWORKGROUP='是'
					}else{
						this.pageData.model.CREATEWORKGROUP='否'
					}
					//主体名称
					if(res.data.attributes.zdyDataSource.busInvestorDataSourceManage){
						this.zhutiData=res.data.attributes.zdyDataSource.busInvestorDataSourceManage
					}
					//中介机构名称
					if(res.data.attributes.zdyDataSource.busOrganizationDataSourceManage){
						this.zhongjieData=res.data.attributes.zdyDataSource.busOrganizationDataSourceManage
						uni.setStorageSync('busOrganizationDataSourceManage',JSON.stringify(res.data.attributes.zdyDataSource.busOrganizationDataSourceManage))
						if(this.pageData.model.ORGANIZATION){
							this.zhongjieData.map(item=>{
								if(item.CODE===this.pageData.model.ORGANIZATION){
									this.pageData.zhongjie=item.CODE_NAME
								}
							})
						}
					}
					const  dicData = JSON.parse(uni.getStorageSync('dicData'))
					//行业类别
					this.pageData.hangye = this.$util.queryDicName(dicData,'inve_field',this.pageData.model.INDUSTRY);
					//获取项目来源参数
					this.pageData.xiangmu = this.$util.queryDicName(dicData,'busProjSource',this.pageData.model.SOURCE);
					//核心诉求
					if(this.pageData.model.PROJ_APPEAL){
						let newbackArry=[]
						const backArry=this.pageData.model.PROJ_APPEAL.split(",")
						backArry.map(item=>{
							newbackArry.push(this.$util.queryDicName(dicData,'PROJ_APPEAL',item));
						})
						this.pageData.suqiu=newbackArry.join(",")
					}
	
					//获取用地方式参数
					this.pageData.yongdifangshi=this.$util.queryDicName(dicData,'busProjSiteMethod',this.pageData.model.SITE_TYPE);
				
					//第2页
					if(itId===2){
						//获取文件名
						const fileArry=Object.values(this.pageData.docJsonData)
						if(this.pageData.dataGrid['Discuss_view'].datas){
							this.pageData.dataGrid['Discuss_view'].datas.map(item=>{
								if(item.DATAKEY){
									fileArry.map(ites=>{
										if(JSON.parse(JSON.stringify(ites))["modelId"]){
											if(JSON.parse(JSON.stringify(ites))["modelId"]===item.DATAKEY){
												if(JSON.parse(JSON.stringify(ites)).fileList.length>0){
													item.file=JSON.parse(JSON.stringify(ites)).fileList
												}else{
													item.file=[]
												}
											}
										}
									})
								}
								if(item.TEAM_MEMBER){
									item.MEMBER_NAME=this.codeToName(item.TEAM_MEMBER)
								}
							})
						}
					}
					//第3页
					if(itId===3){
						if(this.pageData.dataGrid['bus_check_view'].datas){
							this.pageData.dataGrid['bus_check_view'].datas.map(item=>{
								if(item.MEMBER){
									item.MEMBER_NAME=this.codeToName(item.MEMBER)
								}
								if(this.pageData.docJsonData){
									const keysArray=Object.keys(this.pageData.docJsonData)
									keysArray.map(ites=>{
										//项目分析报告附件
										if(ites.indexOf('PPP_T_BUS_CHECK.XMFXBG')!=-1){
											if(ites.indexOf(item.DATAKEY)!=-1){
												item.XMFXBG=this.pageData.docJsonData[ites].fileList
											}	
										}
										//项目分析报告修正附件
										if(ites.indexOf('PPP_T_BUS_CHECK.XMFXBGXZ')!=-1){
											if(ites.indexOf(item.DATAKEY)!=-1){
												item.XMFXBGXZ=this.pageData.docJsonData[ites].fileList
											}	
										}
									})
								}
							})
						}
					}
					//第4页
					if(itId===4){
						if(this.pageData.dataGrid['bus_eval_view'].datas){
							this.pageData.dataGrid['bus_eval_view'].datas.map(item=>{
								if(item.MEMBER){
									item.MEMBER_NAME=this.codeToName(item.MEMBER)
								}
								if(item.STATUS){
									if(item.STATUS===0){
										item.STATUS_NAME='未评估'
									}else if(item.STATUS===1){
										item.STATUS_NAME='评估中'
									}else{
										item.STATUS_NAME='已评估'
									}
									
								}
								if(this.pageData.docJsonData){
									const keysArray=Object.keys(this.pageData.docJsonData)
									keysArray.map(ites=>{
										//项目评估报告附件
										if(ites.indexOf('PPP_T_BUS_EVALUATE.PGFJ')!=-1){
											if(ites.indexOf(item.DATAKEY)!=-1){
												item.PGFJ=this.pageData.docJsonData[ites].fileList.concat(this.pageData.docJsonData[ites].otherFileList)
											}
										}
										//项目评估报告修正附件
										if(ites.indexOf('PPP_T_BUS_EVALUATE.PGXGFJ')!=-1){
											if(ites.indexOf(item.DATAKEY)!=-1){
												item.PGXGFJ=this.pageData.docJsonData[ites].fileList
											}
										}
									})
								}
							})
						}
					}
					//获取联系人参数
					const lianxirenList=this.pageData.dataGrid['TeamMember_view']?this.pageData.dataGrid['TeamMember_view'].datas:[]
					if(lianxirenList.length){
						this.renmingData.map(item=>{
							lianxirenList.map(ites=>{
								if(ites.MEMBER){
									if(JSON.parse(JSON.stringify(item))["CODE"]===ites.MEMBER){
										ites.lianxiren =JSON.parse(JSON.stringify(item))["CODE_NAME"]
									}
								}
							})
						})
					}
					//获取主体名称参数
					const zhutiList=this.pageData.dataGrid.proj_subject_view?this.pageData.dataGrid.proj_subject_view.datas:[]
					if(zhutiList.length){
						this.zhutiData.map(item=>{
							zhutiList.map(ites=>{
								if(ites.INVESTOR){
									if(JSON.parse(JSON.stringify(item))["CODE"]===ites.INVESTOR){
										ites.zhuti =JSON.parse(JSON.stringify(item))["CODE_NAME"]
									}
								}
							})
						})
					}
					
					this.changeListData={
						hangyeList:JSON.parse(dicData.inve_field),
						laiyuanList:JSON.parse(dicData.busProjSource),
						suqiuList:JSON.parse(dicData.PROJ_APPEAL),
						laiyuanList:JSON.parse(dicData.busProjSource),
						zhongjieList:this.zhongjieData,
						zhutiList:this.zhutiData,
						renmingList:this.renmingData
					}
				} else {
					uni.showToast({
						title:res.data.message,
						icon:'none'
					})
				}	
			},
			//跟进人转化
			codeToName(str){
				if(str){
					let newArray=[]
					const arrayOne=str.split(',')
					this.personData.map(item=>{
						arrayOne.map(ites=>{
							if(ites===item.CODE){
								newArray.push(item.CODE_NAME)
							}
						})
					})
					return newArray.join('; ')
				}
			},
			//跟进人
			async getFlPerson(){
				const ret = await this.$req({
					url:'bus/proj/filter.do',
					data:{moduleId: 'busProj'}
				})
				if(ret.data.success){
					this.personData = ret.data.attributes.zdyDataSource.personDataSourceManage
				}
			},
			async getProData(url,itId){
				const res  =await this.$req({
					url:url,
					method:'GET',
					data:{
						projId:this.code
					}
				})
				if(res.data.attributes){
					let sendUrl=''
					this.dataKey=res.data.attributes.dataKey
					if(itId===6){
						sendUrl='bus/proj/contract/view.do'
					}else if(itId===7){
						sendUrl='bus/proj/company/view.do'
					}else if(itId===8){
						sendUrl='/bus/proj/supply/view.do'
					}else if(itId===9){
						sendUrl='bus/proj/build/view.do'
					}else if(itId===10){
						sendUrl='bus/proj/track/view.do'
					}
					this.getDetailData(sendUrl)
				} else {
					uni.showToast({
						title:res.data.message,
						icon:'none'
					})
				}	
			},
			async getDetailData(url){
				this.pageData=[]
				const res  =await this.$req({
					url:url,
					method:'GET',
					data:{
						dataKey:this.dataKey,
						projId: this.code
					}
				})
				if(res.data.success){
					this.pageData=res.data.attributes
					//跟进负责人
					if(res.data.attributes.zdyDataSource.personDataSourceManage){
						this.renmingData = res.data.attributes.zdyDataSource.personDataSourceManage
					}
					//主体名称
					if(res.data.attributes.zdyDataSource.busInvestorDataSourceManage){
						this.zhutiData=res.data.attributes.zdyDataSource.busInvestorDataSourceManage
					}
					//中介机构名称
					if(res.data.attributes.zdyDataSource.busOrganizationDataSourceManage){
						this.zhongjieData=res.data.attributes.zdyDataSource.busOrganizationDataSourceManage
						uni.setStorageSync('busOrganizationDataSourceManage',JSON.stringify(res.data.attributes.zdyDataSource.busOrganizationDataSourceManage))
					}
					//获取跟进负责人参数
					if(this.pageData.model.MANAGER&&this.renmingData){
						this.renmingData.map(item=>{
							if(JSON.parse(JSON.stringify(item))["CODE"]===this.pageData.model.MANAGER){
								this.pageData.genjinren=JSON.parse(JSON.stringify(item))["CODE_NAME"]
							}
						})
					}
					//获取中介机构参数
					if(this.pageData.model.ORG&&this.zhongjieData){
						this.zhongjieData.map(item=>{
							if(JSON.parse(JSON.stringify(item))["CODE"]===this.pageData.model.ORG){
								this.pageData.zhongjie=JSON.parse(JSON.stringify(item))["CODE_NAME"]
							}
						})
					}
					if(this.pageData.model.ORG){
						res.data.attributes.zdyDataSource.busOrganizationDataSourceManage.map(item=>{
							if(this.pageData.model.ORG===item.CODE){
								this.pageData.model.ORG=item.CODE_NAME
							}
						})
					}
					if(this.pageData.model){
						if(this.pageData.model.APPROVE&&this.pageData.model.APPROVE==1){
							this.pageData.model.APPROVE='是'
						}else{
							this.pageData.model.APPROVE='否'
						}
						if(this.pageData.model.DESIGN_MATERIAL&&this.pageData.model.DESIGN_MATERIAL==1){
							this.pageData.model.DESIGN_MATERIAL='是'
						}else{
							this.pageData.model.DESIGN_MATERIAL='否'
						}
						if(this.pageData.model.CONSTRUCT_DESIGN&&this.pageData.model.CONSTRUCT_DESIGN==1){
							this.pageData.model.CONSTRUCT_DESIGN='是'
						}else{
							this.pageData.model.CONSTRUCT_DESIGN='否'
						}
						if(this.pageData.model.SITE_FILE&&this.pageData.model.SITE_FILE==1){
							this.pageData.model.SITE_FILE='是'
						}else{
							this.pageData.model.SITE_FILE='否'
						}
						if(this.pageData.model.PLANNING_LICENSE&&this.pageData.model.PLANNING_LICENSE==1){
							this.pageData.model.PLANNING_LICENSE='是'
						}else{
							this.pageData.model.PLANNING_LICENSE='否'
						}
						if(this.pageData.model.START_CHECK&&this.pageData.model.START_CHECK==1){
							this.pageData.model.START_CHECK='是'
						}else{
							this.pageData.model.START_CHECK='否'
						}
						if(this.pageData.model.FINISH_CHECK&&this.pageData.model.FINISH_CHECK==1){
							this.pageData.model.FINISH_CHECK='是'
						}else{
							this.pageData.model.FINISH_CHECK='否'
						}
						if(this.pageData.model.OTHER&&this.pageData.model.OTHER==1){
							this.pageData.model.OTHER='是'
						}else{
							this.pageData.model.OTHER='否'
						}
					}
				} else {
					uni.showToast({
						title:res.data.messages[0].content,
						icon:'none'
					})
				}	
			},
			//数据字典
			async getDicData(){
				const ret = await this.$api.getDicData();
				this.dicData = {...ret};
			},
			
		},
		onLoad(options) {
			this.getFlPerson()
			this.getDicData()
			console.log('options',options)
			this.code = options.code
			this.showFoot=options.num
			// console.log(this.showFoot,"this.showFoot")
			this.project=options.project*1
			this.goPages(this.pageList[0])
		},
		onShow(){
			this.getDicData()
			this.goPages(this.pageList[0])
			uni.$on("refreshDetailData", res => {
				uni.$off('refreshDetailData');
			})
		},
		onShareAppMessage() {
			if(!this.code){
				return;
			}
			return {
				path:`/pages/index/detail/detail?code=${this.code}&project=${this.project}&num=${this.showFoot}`,
				imageUrl: 'https://www.szaez.com/sck/share.jpg?v=' + new Date().getTime()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wrap{
		padding-bottom: 60rpx;
	}
	page{
		padding-bottom: 20rpx;
	}

	.fixed-action-bar{
		width: 100%;
		display: flex;
		height: 70rpx;
		align-items: center;
		background: #fff;
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 999;
		.item{
			width: 50%;
			display: flex;
			justify-content: center;
			align-items: center;
			
		}
		.icon{
			width: 30rpx;
		}
		.btn-box{
			width: 90rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			height: 70rpx;
		}
		.text-edit{
			font-size: 24rpx;
			color: #0099cc;
			line-height: 70rpx;
		}
		.text-delete{
			font-size: 24rpx;
			color: #cc3357;
			line-height: 70rpx;
		}
	}
	
	
	.tabbar-box{
		width: 750rpx;
		height: 70rpx;
		margin-top: 10rpx;
	}
	.care-all{
		height: 230rpx;
		// padding-top: 22rpx;
		padding: 22rpx 34rpx 0 34rpx;
		background: #fff;
		.cate-section {
			width:682rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			flex-wrap:wrap;
			
			.cate-item {
				width: 20%;
				display: flex;
				flex-direction: column;
				align-items: center;
				font-size:26rpx;
				color: #303133;
				margin-bottom: 20rpx;
			}
			image {
				width: 50rpx;
				height: 50rpx;
				margin-bottom: 10rpx;
				// border-radius: 50%;
			}	
		}
	}
</style>
